import {
  IsString,
  IsNumber,
  IsOptional,
  IsNumberString,
} from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateMenuDto {
  @ApiProperty({ required: true })
  @IsString()
  menuName: string;

  @IsOptional()
  @IsString()
  permission: string;

  @IsOptional()
  @IsString()
  route: string;

  @IsOptional()
  @IsString()
  icon: string;

  @IsOptional()
  @IsNumber()
  parentId: number | null;

  @IsOptional()
  @IsNumberString()
  sort: number;

  @IsOptional()
  @IsString()
  component: string;

  @IsOptional()
  @IsString()
  visible: string;

  @IsNumber()
  menuType: number;

  @IsString()
  status: string;
}
